package per.kongtouxu.dao;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.stereotype.Repository;
import per.kongtouxu.domain.pojo.Admin;
import per.kongtouxu.domain.vo.V_Admin;

import java.util.List;

public interface AdminDao {

    //根据账户密码查询admin
    public Admin findAdminByUP(@Param("admin") String admin,@Param("pwd") String password);
    //分页查询
    public List<V_Admin> findAdminByPage(@Param("adminName") String adminName,@Param("roleId") Integer roleId,@Param("startTime") String startTime,@Param("endTime") String endTime,@Param("rb") RowBounds rb);
    //查询分页数量
    public Integer findCountAdminByPage(@Param("adminName") String adminName,@Param("roleId") Integer roleId,@Param("startTime") String startTime,@Param("endTime") String endTime);
    //增加后台用户
    public Integer saveAdmin(@Param("admin") Admin admin);
    //更新后台用户
    public Integer updateAdmin(@Param("admin") Admin admin);
    //根据AdminId查询Admin
    public Admin findAdminByAdminId(@Param("adminId") Integer adminId);
}
